#include <iostream>
#include <cstring>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>


using namespace std;
void Usage(string proc)
{
    cout << "\n\rUsage: " << proc << " port[1024+]\n" << std::endl;
}
int main(int argc,char*argv[])
{
   if(argc!=3)
   {
       Usage(argv[1]);
   }
   string serverip = argv[1];
   uint16_t serverport = std::stoi(argv[2]);
   struct sockaddr_in server;
   server.sin_family=AF_INET;
   server.sin_port=htons(serverport);
   server.sin_addr.s_addr=inet_addr(serverip.c_str());
   socklen_t len=sizeof(server);
   int sockfd=socket(AF_INET,SOCK_STREAM,0);
   if(sockfd<0)
   {
       
   }
   
   connect(sockfd,(const struct sockaddr*)&server,len);
   
}